package org.example.interpreter;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashMap;

/**
 * @author wangbin
 * @date 2024/4/20
 * @vesion 1.0
 */
public class Client {
    public static void main(String[] args) throws IOException {
        String expStr = getExpStr();

        HashMap<String, Integer> value = getValue(expStr);
        Calculator calculator = new Calculator(expStr);
        System.out.println("expStr = " + expStr+"  "+calculator.run(value));
    }

    public static String getExpStr() throws IOException {
        System.out.println("请输入表达式");
        return (new BufferedReader(new InputStreamReader(System.in))).readLine();
    }

    public static HashMap<String,Integer> getValue(String expStr){
        HashMap<String,Integer> map = new HashMap<>();

        for (char c : expStr.toCharArray()) {
            if(c !='+' ||c !='-'){
                if(!map.containsKey(String.valueOf(c))){
                    //map.put();
                }
            }
        }
        return map;
    }
}
